package com.sixth.controller;

import com.sixth.entity.*;
import com.sixth.service.EntryService;
import com.sixth.util.CommonResult;
import com.sixth.util.LayTab;
import com.sixth.util.TableLayUi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project01
 * @description:
 * @author: 老魏
 * @create: 2021-12-18 10:34
 **/
@RestController
@RequestMapping("/entry")
public class EntryController {
    @Autowired
    private EntryService entryService;

    public EntryController() {
    }
    //
    @RequestMapping({"getAllEntry"})
    public LayTab getAllEntry(Warehousing warehousing, Limit limit) {
        LayTab allEntry = entryService.getAllEntry(warehousing, limit);
        return allEntry;
    }
    //
    @RequestMapping({"getAllShoping"})
    public LayTab getAllShoping(Goods goods, Limit limit, Integer bId) {
        LayTab allShoping = entryService.getAllShoping(goods, limit, bId);
        return allShoping;
    }
    //
    @RequestMapping({"addAllEntry"})
    public CommonResult addAllEntry(String allEntry) {
        CommonResult  result = entryService.addAllEntry(allEntry);
        return result;
    }
    //
    @RequestMapping({"addAllEntry3"})
    public CommonResult  addAllEntry3(String allEntry) {
        CommonResult  result = entryService.addAllEntry3(allEntry);
        return result;
    }
    //
    @RequestMapping({"getAllWarehousings"})
    public LayTab getAllWarehousings(Staff staff, Warehousings warehousings, Integer id) {
        LayTab allWarehousings = entryService.getAllWarehousings(staff, warehousings, id);
        return allWarehousings;
    }

    @RequestMapping({"addGoods"})
    public CommonResult  addGoods(String allGoods) {
        return entryService.addGoods(allGoods);
    }
}
